package com.mengshuai.technology.order.rocketmq.consumer;

import com.mengshuai.technology.order.rocketmq.topic.TopicConstant;
import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * 主题A消费
 *
 * @author ms
 * @since 2025/06/25
 */
@Service
@RocketMQMessageListener(
        topic = TopicConstant.TOPIC_A  ,
        consumerGroup = "consumerGroupA1", // 引用独立配置
        messageModel = MessageModel.BROADCASTING
)
public class TopicA1BroadcastConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        System.out.println("TopicA1BroadcastConsumer [广播] 消费消息: " + message);
    }
}


